import { observable, action } from 'mobx';
import { Browser, BrowserHrm } from 'weaver-mobile-page';

export default class EntranceBasicStore {
  @observable browser = new Browser.Store({ route: '/emobile-entrance', id: 'entrance-wf' });
  @observable browserHrm = new BrowserHrm.Store({ route: '/emobile-entrance', id: 'entrance-hrm' });
  @observable browserValue = [];
  @observable errMsg = '';
  @observable passed = false;
  @observable type = '';
  @observable isHrm = false;

  @action
  addErrMsg = (msg) => {
    this.errMsg += msg;
  }
  @action
  setPass = (pass) => {
    this.passed = pass;
  }
  @action
  setType = (type) => {
    this.type = type;
    if (type === '1' || type === '17') {
      this.isHrm = true;
    } else {
      this.isHrm = false;
    }
  }
}